﻿using System.Net;

namespace CommonUtils
{
    public static class NetworkUtil
    {
        public static IPEndPoint GetIPEndPoint(string hostPort)
        => IpUtil.GetEndPoint(hostPort);

        public static void Test(string uploadUrl = "http://yanzhou.online:8008/api/file/upload")
        {
            string path = FileUtil.FindIn(SystemUtil.DownloadsFolder, "*.torrent");
            if (!string.IsNullOrEmpty(path))
                HttpUtil.Upload(uploadUrl, path);
        }
    }
}
